<template>
	<view class="flex-col">
		<view class="flex-row u-row-center w-full section_1">
			<u-tabs :list="tabs" @click="clickTab" lineWidth="30" lineHeight="6" lineColor="#1D6AFF"></u-tabs>
		</view>

		<progress-tab ref="protab" v-if="index==0"></progress-tab>
		<process :source="source" :sourceOrderid="orderid" ref="process" v-if="index==1"></process>
	</view>
</template>

<script>
	import progressTab from "./progress"
	import process from "@/pages/index/check/checkProgress"
	export default {
		components: {
			progressTab,
			process
		},
		data() {
			return {
				index: 0,
				source: '',
				orderid: 0,
				tabs: [{
						name: '施工进度',
					}, {
						name: '巡检进程',
					}

				]
			};
		},
		onLoad(option) {
			if (option.orderid) {
				this.orderid = option.orderid;
			}
			if (option.source) {
				this.source = option.source
			}
		},
		methods: {
			clickTab(i, item) {
				this.index = i.index;
			},


		},
	};
</script>
